<!DOCTYPE html>
<html lang="en">
	<head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Students Management Portal</title>
		<meta name="generator" content="Bootply" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="Assets/css/bootstrap.min.css" />
		<!--[if lt IE 9]>
			<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->
		<link rel="stylesheet" href="Assets/css/style.css" />
                <style>body {padding-top: 70px;}</style>
	</head>
	<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=1584685215086767&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>            
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
	<div class="navbar-header">
        <a class="navbar-brand" rel="home" href="Index.jsp">SM Portal</a>
		<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
		<span class="sr-only">Toggle navigation</span>
		<span class="icon-bar"></span>
		<span class="icon-bar"></span>
		<span class="icon-bar"></span>
		</button>
	</div>
	<div class="collapse navbar-collapse">
		<ul class="nav navbar-nav">
                    <%
                        String cur = request.getParameter("c");
                        if(cur == null) cur = "home";
                    %>
                    <li <%if(cur.equals("home")) out.print("class=\"active\"");%>><a href="Index.jsp">Home</a></li>
                        <%

                            DAO_Category daocat = new DAO_Category();
                            List<Category> categories = daocat.categoryList();
                            for(Category category : categories) {
                                %>
                        <li <%if(cur.equalsIgnoreCase(category.getSlug())) out.print("class=\"active\"");%>><a href="Index.jsp?c=<%=category.getSlug()%>"><%=category.getName()%></a></li>
                                <%
                            }
                        %>
		</ul>
		<div class="col-sm-3 col-md-3 pull-right">
          <form class="navbar-form" role="search" method="POST">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="Search" name="search-term" id="search-term">
                <div class="input-group-btn">
                    <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
                </div>
            </div>
          </form>
		</div>
	</div>
</nav>            